<form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()">

  <div nz-form-item>
    <div nz-form-control>
      <nz-input formControlName="userName" [nzPlaceHolder]="'请输入用户名'" [nzSize]="'large'">
        <ng-template #prefix>
          <i class="anticon anticon-user"></i>
        </ng-template>
      </nz-input>
      <div nz-form-explain *ngIf="validateForm.controls.userName.dirty&&validateForm.controls.userName.hasError('required')">请输入用户名!</div>
    </div>
  </div>


  <div nz-form-item>
    <div nz-form-control>
      <nz-input formControlName="password" [nzType]="'password'" [nzPlaceHolder]="'请输入密码'" [nzSize]="'large'">
        <ng-template #prefix>
          <i class="anticon anticon-lock"></i>
        </ng-template>
      </nz-input>
        <div nz-form-explain
             *ngIf="validateForm.controls.password.dirty&&validateForm.controls.password.hasError('required')">请输入密码!</div>
    </div>
  </div>


  <div nz-form-item>
    <div nz-form-control>
      <button nz-button class="login-form-button" [nzType]="'primary'" [nzSize]="'large'">Log in</button>
    </div>
  </div>

</form>
